$size =
wave.datasize ("<Wavefile>","[Compr]")
Returns the datasize of the wave file. This function does not perform compression but calculates the space requirement.
Parameters
<Wavefile>
Specify the name of the wave file.
<Compr>
Specify the wave compression format.
Return Value
On successful execution, it returns the datasize of the wave file in compressed format, otherwise returns 0.
Remark
If compression format is not specified, it returns datasize of the wave file in current format.
If $size = 0, $error contains exact error that occurred.
Example
-
$size = wave.datasize("welcome.wav", "GSM")
msgbox($size)
- Returns the size of the wave file if welcome.wav is converted to GSM format.
2. $size = wave.datasize("welcome.wav")
msgbox($size)
- Returns the size of the wave file in current format.
The data size can be retrieved quickly if the data type is already known/PCM16.
3. $size = wave.datasize("welcome.wav","PCM16_8KHz")
msgbox($size)
- Returns size of the wave file if welcome.wav is converted to PCM16 _8Khz format.